<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>场地使用</title>
    <link rel="stylesheet" th:href="@{../static/css/component.css}">
    <link rel="stylesheet" th:href="@{../static/css/admin.css}">
    <link rel="stylesheet" th:href="@{../static/css/font-awesome.min.css}">
    <script th:src="@{../static/js/JQuery2.1.4.js}"></script>
    <script th:src="@{../static/js/common.js}"></script>
    <script th:src="@{../static/js/vue.2.6.js}"></script>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-inverse navbar-fixed-top " role="navigation">
    <div class="container">
        <div class="row">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" th:href="@{../user/index}">GMS</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a th:href="@{../user/index}">首页</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">场地<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../toPlaceApply1}">预约场地</a></li>
                            <li><a th:href="@{../toPlaceUse}">场地使用</a></li>
                            <li><a th:href="@{../toUserPlaceApply}">预约退订</a></li>
                            <li><a th:href="@{../toStanderDetail}">场地收费标准</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">器材<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../equipment/showEquipment}" >租借</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">赛事<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../event/touserevent(pageNum=1,userId=${session.username})}">我的赛事</a></li>
                            <li><a th:href="@{../event/toeventcreate}">创建赛事</a></li>
                        </ul>
                    </li>
                    <li class="active">
                        <a th:href="@{../notice/tonoticeuser}">网站公告</a>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li th:if="${session.permission}!='0'" ><a th:href="@{../management}">管理后台</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">用户<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../user/toChangeuser}">修改资料</a></li>
                            <li><a th:href="@{../user/toChangepassword}">修改密码</a></li>
                            <li class="divider"></li>
                            <li><a th:href="@{/login}">退出登录</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</nav>
<div class="rbody1" id="app1">
    <div class="main" id="use">
        <div class="container-fluid">
            <div class="col-sm-12" id="right">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        搜索
                    </div>
                    <div class="panel-body">
                        <form role="form">
                            <div  class="form-inline">
                                <div class="form-group">
                                    <label>楼层</label>
                                    <select class="form-control">
                                        <option>一楼</option>
                                        <option>二楼</option>
                                        <option>三楼</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>场地类型</label>
                                    <select class="form-control">
                                        <option>篮球场</option>
                                        <option>羽毛球场</option>
                                        <option>乒乓球场</option>
                                        <option>台球场</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <button type="button" class="btn btn-default">开始筛选</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!--
                    列表展示
                -->
                <div class="table-responsive">
                    <table class="table table-striped ">
                        <thead>
                        <tr>
                            <th>一卡通号</th>
                            <th>场地编号</th>
                            <th>场地楼层及类型</th>
                            <th>预约时间</th>
                            <th>准确时间段</th>
                            <th>场地开始使用时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(placeapply,index) in placeuses">
                                <td>{{placeapply.user_id}}</td>
                                <td>{{placeapply.place_no}}</td>
                                <td>{{placeapply.place_storey}}/{{placeapply.place_type}}</td>
                                <td>{{placeapply.apply_date  | formatDate }}</td>
                                <td>{{placeapply.apply_period}}</td>
                                <td>{{placeapply.apply_start}}</td>
                                <td>
                                    <div class="btn-group">
                                        <a @click="placeUse(index,placeapply.apply_id,placeapply.apply_period,placeapply.apply_start)" style="font-size: 16px"><i class="fa fa-check" aria-hidden="true"></i>开始使用</a>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <ul class="pagination">
                    <li><a @click="getPlaceUses(page.prePage)">&laquo;</a></li>
                    <li v-for="index in page.pages" :class="(page.pageNum == index) ? 'active' : '' ">
                        <a><span>{{index}}</span></a>
                    </li>
                    <li><a @click="getPlaceUses(page.nextPage)">&raquo;</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<script th:src="@{../static/js/placeuse.js}"></script>
</body>
</html>